var elec = require('electron');
var app = elec.app;
app.allowRendererProcessReuse = true;
var browser = elec.BrowserWindow;
var window = null;
app.on('window-all-closed', () => {
    app.quit();
});

app.on('ready', () => {
    window = new browser({
        width: 800,
        height: 600,
        webPreferences: {
            nodeIntegration: true,
            webSecurity:false
        }
    });
    window.loadURL('file://' + __dirname + '/pages/index/index.html');
    window.maximize();
    window.on('closed', () => {
        window = null;
    })
});